qDecodeDataUrl(): fix precondition violation in call to QByteArrayView::at()
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Thu, 29 Jan 2026 19:25:23 +0000 (22:25 +0300)
committerDmitry Shachnev <mitya57@debian.org>
Thu, 29 Jan 2026 19:25:23 +0000 (22:25 +0300)
commit2742060c19194dcb55242eb395451d58457d9c6e
treeeb865a3fad2013cc37b16cc2a403e15e1c7426a5
parent42161d040ebf7eeab6c7039aade8bdd3b56b8c37
qDecodeDataUrl(): fix precondition violation in call to QByteArrayView::at()

Origin: upstream, https://download.qt.io/official_releases/qt/5.15/CVE-2025-5455-qtbase-5.15.patch
Last-Update: 2025-06-29

It is a precondition violation to call QByteArrayView::at() with
size() as argument. The code used that, though, as an implicit
end-of-string check, assuming == ' ' and == '=' would both fail for
null bytes. Besides, QByteArrays (but most certainly QByteArrayViews)
need not be null-terminated, so this could read even past size().

To fix, use higher-level API (startsWith()), consuming parsed tokens
along the way.

Gbp-Pq: Name CVE-2025-5455.diff
src/corelib/io/qdataurl.cpp